<?
	
require_once 'ActiveRecord.php';

// $connections = array(
//   'development' => 'mysql://root:33422516@localhost/sm',
//   'production' => 'mysql://guarat:asd6g1a6df1h@localhost/guara_ti_com_ar_test',
//   'test' => 'mysql://username:password@localhost/test'
// );

include_once(APP_PATH . 'config_db.php');
 
 # must issue a "use" statement in your closure if passing variables
 ActiveRecord\Config::initialize(function($cfg) use ($connections)
 {
   $cfg->set_model_directory(MODEL_PATH);
   $cfg->set_connections($connections);
 
   # default connection is now production
   $cfg->set_default_connection('development');
 });

?>
